﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIG.DAL.Dapper.Model
{

    /// <summary>
    /// A class which represents the EmailTemplateSet table.
    /// </summary>
    [Table("EmailTemplateSet")]
    public partial class EmailTemplate
    {
        [Key]
        public virtual int Id { get; set; }
        public virtual string Subject { get; set; }
        public virtual string Body { get; set; }
        public virtual string TemplateNo { get; set; }
        public virtual int EmailAccountId { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual string UpdatedBy { get; set; }
        public virtual DateTime? UpdatedDate { get; set; }
        public virtual EmailAccount EmailAccount { get; set; }

        [Editable(false)]
        public string Email
        {
            get { return EmailAccount != null ? EmailAccount.Email : string.Empty; }
        }
    }


}
